package com.xingkeduo.remote.feign;

import com.xingkeduo.dto.QueryByUserIdResponseDto;
import com.xingkeduo.dto.param.CommentInitDto;
import com.xingkeduo.pojo.table.Comments;
import com.xingkeduo.pojo.table.Labels;
import com.xingkeduo.utils.PageResponseDTO;
import com.xingkeduo.utils.ResponseUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "business-comments")
public interface CommentsFeignService {
    //查询历史评价列表
    @RequestMapping("/api/comments/query/user")
    ResponseUtils<PageResponseDTO<QueryByUserIdResponseDto>>  getCommensByUserId(@RequestParam(value = "userId") String userId,@RequestParam(value = "pageNo") int pageNo,@RequestParam(value = "pageSize") int pageSize,@RequestParam(value = "labels") String labels,@RequestParam(value = "isUser") int isUser,@RequestParam(value = "storeId") int storeId);


    //查询标签
    @RequestMapping("/api/comments/lables/{start}")
    ResponseUtils<List<Labels>>   queryLabelsByStart(@PathVariable("start") @RequestParam(value = "start") int start);


    /**
     * 用户评论添加
     * @return
     */
    @PostMapping("/api/comments/add/no")
    ResponseUtils  insertNO(@RequestBody CommentInitDto commentInitDto);



    /**
     * 查询评论信息,根据订单No
     * @param orderNo
     * @return
     */
    @RequestMapping("/api/comments/detail/orderNo")
    ResponseUtils<Comments>   queryDetailByorderNo( @RequestParam(value = "orderNo") String orderNo);


}
